import startSearchModel from "@/config/startSearchModel";

export default () => {
    return {
        submitText: '修改',
        size: 'default',
        labelWidth: 120,
        index: true,

        menuAlign: 'center',
        menuPosition: "right",
        searchIndex: 2,
        searchMenuSpan: 6,
        searchIcon: true,
        menuType: "menu",
        addBtn: false,
        editBtn: false,
        viewBtn: true,

        permissionBtn: {
            viewBtn: 'start:quartz:log:info',
            delBtn: 'start:quartz:log:delete',
        },
        column: [

            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "任务编码",
                search: true,
                searchModel: startSearchModel.LIKE,
                "prop": "quartzCode",
                "showColumn": true,
                "type": "input",
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "任务名称",
                search: true,
                searchModel: startSearchModel.LIKE,
                "prop": "quartzName",
                "showColumn": true,
                "type": "input",
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "任务开始时间",
                "prop": "startTime",
                "showColumn": true,
                "type": "datetime",
                format: "YYYY-MM-DD HH:mm:ss"

            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "任务结束时间",
                "prop": "endTime",
                "showColumn": true,
                "type": "datetime",
                format: "YYYY-MM-DD HH:mm:ss"
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "任务耗时(毫秒)",
                "prop": "quartzDuration",
                "showColumn": true,
                "type": "input",
            },
            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "执行状态",
                "prop": "quartzInvokeStatus",
                "showColumn": true,
                "type": "select",
                search: true,
                value: 0,
                tag: true,
                tagProp: {
                    0: {type: "primary"},
                    '-1': {type: "info"},
                },
                dicData: [
                    {
                        label: "成功",
                        value: 0
                    }, {
                        label: "失败",
                        value: -1
                    },
                ]
            },

            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "失败原因",
                "prop": "errorMessage",
                "showColumn": true,
                "type": "textarea",
                span: 24,
                width: 120,
                showWordLimit: true,
                maxlength: 100,
            },

        ]

    }
}
